package org.resty.mboot.app.exception;

/**
 * Created by ZhanYuan CH on 2016/10/23.
 * errorCode：0200 0020 1601
 * 前四位错误类型、中间四位错误场景、后四位错误代码
 */
public enum ErrorEnum implements ExceptionEnums{
    DEFAULT_ERROR("ERR_COMM_000", "系统处理执行出错"),

    NULL_OBJ("ERR_COMM_001","参数{0}为空"),
    UPDTAE_ENTITY_FAIL("ERR_COMM_001","更新实体{0}失败,原因是{1}");


    private ErrorEnum(String code, String message){
        this.code = code;
        this.message = message;
    }

    private String code;
    private String message;

    @Override
    public String  getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return  "[" + this.code + "]" + this.message;
    }



    /**
     * 参数{0}不能为空
     */

    /**
     * 参数{0}已经存在
     */
}
